<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/admintemplate.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewStaffTitle}"></h:outputText>
        </ui:define>
        <ui:define name="leftmenu">
            <h:form>
                <ul class="section menu">
                    <li><a class="menuitem">#{bundle.ControlPanelMenu}</a>
                        <ul class="submenu">
                            <li><h:commandLink action="#{courseController.prepareCreate}" value="#{bundle.ListCourseCreateLink}"/> </li>
                            <li><h:commandLink action="#{courseController.prepareList}" value="#{bundle.CreateCourseShowAllLink}" immediate="true"/> </li>
                        </ul>
                    </li>
                </ul>
            </h:form>
        </ui:define>
        <ui:define name="content">
            <h2>#{bundle.ViewStaffTitle}</h2>
            <div class="block">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
                <h:form>
                    <table class="form">
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_staffId}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.staffId}" title="#{bundle.ViewStaffTitle_staffId}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_type}"/>
                            </td>
                            <td class="col2"> 
                                <h:outputText value="#{staffController.getTypeStr(staffController.selected.type)}" title="#{bundle.ViewStaffTitle_type}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_userName}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.userName}" title="#{bundle.ViewStaffTitle_userName}"/>
                            </td>
                        </tr>
                        <!--<tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_password}"/>
                            </td>
                            <td class="col2"> 
                                <h:outputText value="#{staffController.selected.password}" title="#{bundle.ViewStaffTitle_password}"/>
                            </td>
                        </tr>!-->
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_fullName}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.fullName}" title="#{bundle.ViewStaffTitle_fullName}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_address}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.address}" title="#{bundle.ViewStaffTitle_address}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_dateOfBirth}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.dateOfBirth}" title="#{bundle.ViewStaffTitle_dateOfBirth}">
                                    <f:convertDateTime pattern="MM/dd/yyyy" />
                                </h:outputText>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_gender}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.getGenderStr(staffController.selected.gender)}" title="#{bundle.ViewStaffTitle_gender}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_email}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.email}" title="#{bundle.ViewStaffTitle_email}"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <h:outputText value="#{bundle.ViewStaffLabel_phone}"/>
                            </td>
                            <td class="col2">
                                <h:outputText value="#{staffController.selected.phone}" title="#{bundle.ViewStaffTitle_phone}"/>
                            </td>
                        </tr>
                    </table>
                    <h:commandLink action="#{staffController.destroyAndView}" class="btn-icon btn-teal btn-cross btn-small">
                        <span></span>
                        #{bundle.ViewStaffDestroyLink}
                    </h:commandLink>&nbsp;
                    <h:link outcome="Edit" class="btn-icon btn-teal btn-arrow-right btn-small">
                        <span></span>
                        #{bundle.ViewStaffEditLink}
                    </h:link>
                </h:form>
            </div>
        </ui:define>
    </ui:composition>

</html>
